package com.heima.Serivce;

import com.heima.Serivce.impl.ArticleClientFallback;
import com.heima.model.Article.Pojo.ApAuthor;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.WmNewstoArticleDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;


//feign降级
@FeignClient(value = "HMTTArticleServer",fallback = ArticleClientFallback.class )
public interface ArticleCilent {
    @PostMapping("app/article/api/v1/article/save")
    public ResponseResult SaveArticle(@RequestBody WmNewstoArticleDto wmNewstoArticleDto);

    @PostMapping("author/add")
    public ResponseResult AddAuthor(@RequestBody ApAuthor apAuthor);

    @DeleteMapping("app/article/api/v1/article/down")
    public ResponseResult DwonArticle(@RequestBody Long id);

}
